package com.sh.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sh.common.BaseResult;
import com.sh.entity.Subject;
import com.sh.service.ISubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/subject")
public class SubjectController {

    @Autowired
    private ISubjectService subjectService;

    @RequestMapping("/list")
    public BaseResult list() {
        return BaseResult.success(subjectService.list(new QueryWrapper<Subject>().orderByAsc("ord")));
    }

}
